import {Interceptor} from "../../../src/core/Interceptor";
import {Ctx} from "../../../src";
import {Util} from "../../../src/util/Util";


export class SleepInterceptor extends Interceptor{

    async after(ctx:Ctx){
        const time = ctx.params.time || 0;
        await Util.sleep(time);
        ctx.next();
    }

}
